package com.itcncp.ucenter.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class UserTripJnl implements Serializable {
    /**
     * 用户id
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private Long userId;

    private String transNo;

    /**
     * 通行费额
     *
     * @mbg.generated
     */
    private BigDecimal tollFare;

    /**
     * 实际金额
     *
     * @mbg.generated
     */
    private BigDecimal actFare;

    /**
     * 交易时间
     *
     * @mbg.generated
     */
    private Date tollTime;

    /**
     * 入口车道
     *
     * @mbg.generated
     */
    private String iLaneId;

    /**
     * 出口车道
     *
     * @mbg.generated
     */
    private String eLaneId;

    /**
     * 支付方代号
     *
     * @mbg.generated
     */
    private Byte payId;

    /**
     * 是否已开发票 1、未开  2、已开票
     *
     * @mbg.generated
     */
    private Byte invoiceState;

    /**
     * 发票流水号
     *
     * @mbg.generated
     */
    private Long invoiceNo;

    private static final long serialVersionUID = 1L;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getTransNo() {
        return transNo;
    }

    public void setTransNo(String transNo) {
        this.transNo = transNo;
    }

    public BigDecimal getTollFare() {
        return tollFare;
    }

    public void setTollFare(BigDecimal tollFare) {
        this.tollFare = tollFare;
    }

    public BigDecimal getActFare() {
        return actFare;
    }

    public void setActFare(BigDecimal actFare) {
        this.actFare = actFare;
    }

    public Date getTollTime() {
        return tollTime;
    }

    public void setTollTime(Date tollTime) {
        this.tollTime = tollTime;
    }

    public String getiLaneId() {
        return iLaneId;
    }

    public void setiLaneId(String iLaneId) {
        this.iLaneId = iLaneId;
    }

    public String geteLaneId() {
        return eLaneId;
    }

    public void seteLaneId(String eLaneId) {
        this.eLaneId = eLaneId;
    }

    public Byte getPayId() {
        return payId;
    }

    public void setPayId(Byte payId) {
        this.payId = payId;
    }

    public Byte getInvoiceState() {
        return invoiceState;
    }

    public void setInvoiceState(Byte invoiceState) {
        this.invoiceState = invoiceState;
    }

    public Long getInvoiceNo() {
        return invoiceNo;
    }

    public void setInvoiceNo(Long invoiceNo) {
        this.invoiceNo = invoiceNo;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", transNo=").append(transNo);
        sb.append(", tollFare=").append(tollFare);
        sb.append(", actFare=").append(actFare);
        sb.append(", tollTime=").append(tollTime);
        sb.append(", iLaneId=").append(iLaneId);
        sb.append(", eLaneId=").append(eLaneId);
        sb.append(", payId=").append(payId);
        sb.append(", invoiceState=").append(invoiceState);
        sb.append(", invoiceNo=").append(invoiceNo);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserTripJnl other = (UserTripJnl) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getTransNo() == null ? other.getTransNo() == null : this.getTransNo().equals(other.getTransNo()))
            && (this.getTollFare() == null ? other.getTollFare() == null : this.getTollFare().equals(other.getTollFare()))
            && (this.getActFare() == null ? other.getActFare() == null : this.getActFare().equals(other.getActFare()))
            && (this.getTollTime() == null ? other.getTollTime() == null : this.getTollTime().equals(other.getTollTime()))
            && (this.getiLaneId() == null ? other.getiLaneId() == null : this.getiLaneId().equals(other.getiLaneId()))
            && (this.geteLaneId() == null ? other.geteLaneId() == null : this.geteLaneId().equals(other.geteLaneId()))
            && (this.getPayId() == null ? other.getPayId() == null : this.getPayId().equals(other.getPayId()))
            && (this.getInvoiceState() == null ? other.getInvoiceState() == null : this.getInvoiceState().equals(other.getInvoiceState()))
            && (this.getInvoiceNo() == null ? other.getInvoiceNo() == null : this.getInvoiceNo().equals(other.getInvoiceNo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getTransNo() == null) ? 0 : getTransNo().hashCode());
        result = prime * result + ((getTollFare() == null) ? 0 : getTollFare().hashCode());
        result = prime * result + ((getActFare() == null) ? 0 : getActFare().hashCode());
        result = prime * result + ((getTollTime() == null) ? 0 : getTollTime().hashCode());
        result = prime * result + ((getiLaneId() == null) ? 0 : getiLaneId().hashCode());
        result = prime * result + ((geteLaneId() == null) ? 0 : geteLaneId().hashCode());
        result = prime * result + ((getPayId() == null) ? 0 : getPayId().hashCode());
        result = prime * result + ((getInvoiceState() == null) ? 0 : getInvoiceState().hashCode());
        result = prime * result + ((getInvoiceNo() == null) ? 0 : getInvoiceNo().hashCode());
        return result;
    }
}